﻿@model FTBS.Models.Entities.User
@{
    ViewBag.Title = "Cập nhật thông tin";
    Layout = "~/Views/Shared/_AdminLayout.cshtml";
}
<style>
    .Label {
        text-align: right;
        padding-right: 10px;
        font-weight: bold;
        color: black;
    }

    .Textbox {
        text-align: left;
    }
</style>
@using (Html.BeginForm("EditProfile", "Supplier", null, FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    @Html.HiddenFor(model => Model.UserName)
    @Html.HiddenFor(pass => Model.Password)
    <div style="padding: 20px 20px 0px 20px;">
        <legend style="margin-top: 10px">CẬP NHẬT THÔNG TIN</legend>
        <table class="table striped bordered hovered">
            <tr>
                <th style="text-align:left">Ảnh đại diện
                </th>
                <td>
                    <div class="input-control file info-state" data-role="input-control">
                        <input id="ImagePath" title="Upload a product image" type="file" name="file" />
                        <input type="text" id="__input_file_wrapper__" readonly="" style="z-index: 1; cursor: default;">
                        <button class="btn-file" type="button" name="submit"></button>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="Label">Tên nhà cung cấp (*):
                </td>
                <td>
                    <div class="input-control file info-state">
                        @Html.EditorFor(model => model.FullName)
                        <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.FullName)</p>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="Label">Địa chỉ (*):</td>
                <td>
                    <div class="input-control file info-state">
                        @Html.EditorFor(model => model.Address)
                        <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.Address)</p>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="Label">Email (*):</td>
                <td>
                    <div class="input-control file info-state">
                        @Html.EditorFor(model => model.Email)
                        <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.Email)</p>
                        @if (ViewBag.Email != null)
                        { 
                            <p style="color: red; font-size: 10pt">Email này đã được sử dụng!</p>
                        }
                    </div>
                </td>
            </tr>
            <tr>
                <td class="Label">Số điện thoại (*):</td>
                <td>
                    <div class="input-control file info-state">
                        @Html.EditorFor(model => model.PhoneNumber)
                        <p style="color: red; font-size: 10pt">@Html.ValidationMessageFor(model => model.PhoneNumber)</p>
                    </div>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                <div>
                    <input class="button info" type="submit" value="Lưu" style="text-align: center; width: 77px" />
                    <button class="button danger" style="float: right">
                        @Html.ActionLink("Quay Lại", "Profile")
                    </button>
                </div>
            </td>
               </tr>
        </table>
    </div>
}

